Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 7 - View-Related Objects / View-Related Objects Reference
View Port Functions / Manipulating View Port Object Properties


GXSetViewPortClip

You can use the GXSetViewPortClip function to set the clip property of a view port object.

void GXSetViewPortClip(gxViewPort target, gxShape clip);
target
A reference to the view port whose clip you wish to set.
clip
A reference to a shape object whose geometry describes the clip to be assigned.
DESCRIPTION
The GXSetViewPortClip function copies information from the shape object referenced by the clip parameter into the clip property of the view port object referenced by the target parameter. You can specify nil for the clip parameter, in which case this function sets the clip property of the target view port to a full clip. (A full clip indicates that QuickDraw GX should not apply view port clipping to shapes drawn to this view port.)

Although a filled rectangle shape is most typical for a view port clip, the new clip shape may be a geometric shape, a bitmap shape, or a glyph shape. It may not be a picture, text, or layout shape.

Because it is copied into the view port, changing the clip shape after calling GXSetViewPortClip does not affect the view port's clip.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
invalid_viewPort_reference
colorProfile_must_be_nil(debugging version)
bitmap_pixel_size_must_be_1(debugging version)
empty_shape_not_allowed(debugging version)
ignorePlatformShape_not_allowed(debugging version)
nil_style_in_glyph_not_allowed(debugging version)
complex_glyph_style_not_allowed(debugging version)
illegal_type_for_shape(debugging version)
shapeFill_not_allowed(debugging version)
viewPort_is_a_window(debugging version)
Notices (debugging version) 
clip_already_set 
tags_in_shape_ignored 
SEE ALSO
For examples of the use of this function, see Listing 7-4 on page 7-46 and Listing 7-5 on page 7-47.

For information about geometric shapes and bitmap shapes, see Inside Macintosh: QuickDraw GX Graphics. For information about glyph shapes, see Inside
Macintosh: QuickDraw GX Typography.

To retrieve a copy of the view port clip, use the GXGetViewPortClip function, described in the previous section.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996